package com.bwie.controller;

import com.bwie.service.ClassService;
import com.bwie.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: day0617mounth
 * @ClassName ClassController
 * @description:
 * @author: 段阳
 * @create: 2024-06-17 10:10
 **/
@RestController
@RequestMapping("class")
public class ClassController {

    @Autowired
    private ClassService classService;
    /**
    * //TODO
    * @author 段阳
    * @date 2024/6/17 10:55
     * @param id
     * @return com.bwie.util.R
    */
    @PostMapping("/getClassById")
    public R getClassById(@RequestParam(name = "id") Integer id){
        return classService.getClassById(id);
    }

    /**
     * //TODO
     * @author 段阳
     * @date 2024/6/17 10:55
     * @param id
     * @return com.bwie.util.R
     */
    @PostMapping("/findClassList")
    public R findClassList(@RequestParam(name = "id") Integer id){
        return classService.findClassList(id);
    }
}